home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
qbasicpg.zip
/
CIRCLE.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-08-31
|
615b
|
19 lines
' CIRCLE.BAS
' This program displays the circumference of a circle when
' the radius is supplied by the user.
CONST PI# = 3.141592654# ' declare constant
CLS ' clear screen
PRINT "This program calculates the circumference of a circle ";
PRINT "from its radius."
PRINT ' get input from user
INPUT "Enter the radius of the circle: ", radius!
circum! = 2 * PI# * radius! ' calculate circumference
PRINT ' print result
PRINT "The circumference of the circle is"; circum!